﻿CREATE proc thuan_qtdanhmucchuongtrinhthem      
@TenChuongTrinh nvarchar(255),    
@DienGiai nvarchar(255)  ,    
@NhomCT int  ,  
@Hinh as image =null       
as      
if exists(select * from DanhMuc_ChuongTrinh Where TenChuongTrinh=@TenChuongTrinh)      
begin      
select ErrCode=0      
end      
else      
begin      
insert into DanhMuc_ChuongTrinh (TenChuongTrinh,DienGiai,NhomCT,Hinh)values(@TenChuongTrinh,@DienGiai,@NhomCT,@Hinh)      
select ErrCode=1      
end 